package com.yuda.campsite.service.impl;

import java.util.List;

import com.yuda.campsite.service.ICampsiteWorkStudentService;
import com.yuda.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yuda.campsite.mapper.CampsiteWorkStudentMapper;
import com.yuda.campsite.domain.CampsiteWorkStudent;
import com.yuda.campsite.service.ICampsiteWorkStudentService;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author wyn
 * @date 2021-12-06
 */
@Service
public class CampsiteWorkStudentServiceImpl implements ICampsiteWorkStudentService
{
    @Autowired
    private CampsiteWorkStudentMapper campsiteWorkStudentMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public CampsiteWorkStudent selectCampsiteWorkStudentById(Long id)
    {
        return campsiteWorkStudentMapper.selectCampsiteWorkStudentById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param campsiteWorkStudent 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<CampsiteWorkStudent> selectCampsiteWorkStudentList(CampsiteWorkStudent campsiteWorkStudent)
    {
        return campsiteWorkStudentMapper.selectCampsiteWorkStudentList(campsiteWorkStudent);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param campsiteWorkStudent 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertCampsiteWorkStudent(CampsiteWorkStudent campsiteWorkStudent)
    {
        campsiteWorkStudent.setCreateTime(DateUtils.getNowDate());
        return campsiteWorkStudentMapper.insertCampsiteWorkStudent(campsiteWorkStudent);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param campsiteWorkStudent 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateCampsiteWorkStudent(CampsiteWorkStudent campsiteWorkStudent)
    {
        campsiteWorkStudent.setUpdateTime(DateUtils.getNowDate());
        return campsiteWorkStudentMapper.updateCampsiteWorkStudent(campsiteWorkStudent);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param ids 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteCampsiteWorkStudentByIds(Long[] ids)
    {
        return campsiteWorkStudentMapper.deleteCampsiteWorkStudentByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param id 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteCampsiteWorkStudentById(Long id)
    {
        return campsiteWorkStudentMapper.deleteCampsiteWorkStudentById(id);
    }
}
